package com.maimao.goods.client;

import com.maimao.core.constant.ServiceContainer;
import com.maimao.core.interceptor.FeignInterceptor;
import com.maimao.core.model.resp.Result;
import com.maimao.goods.client.factory.EsDocFallBackFactory;
import com.maimao.goods.client.factory.UploadFallBackFactory;
import com.maimao.model.search.DocInput;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.validation.Valid;
import java.util.List;

/**
 * @author MaoLin Wang
 * @date 2020/12/22 7:54 下午
 */
@RequestMapping("/search/doc")
@FeignClient(value = ServiceContainer.SEARCH_SERVICE, fallbackFactory = EsDocFallBackFactory.class, configuration = FeignInterceptor.class)
public interface EsDocClient {

    @PostMapping("/create")
    public Result createDoc(@RequestBody DocInput docInput);
}
